package javabase.schoolwork.day6_11;

/**
 * @author fance
 * @date 2018/6/12 9:36
 */
public class Consumer implements Runnable{
    private ATM atm;

    public Consumer(ATM atm) {
        this.atm = atm;
    }

    @Override
    public void run() {
        while (true) {
            try {
                atm.withDraw(100);
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
